<template lang="pug">
  .home-list
    h2 
      router-link(:to="`/articles/${this.articleItem.aid}`") {{articleItem.title}}
    span.author {{articleItem.username}}
    span.date {{articleItem.createAt | formatDate}}
    p.tag 分类：
      el-tag(v-if="articleItem.tag") {{articleItem.tag}}
      b(v-else) 无
</template>

<script>
  export default {
    props: {
      articleItem: Object
    },
    methods: {
    },
  }
</script>

<style lang="less" scoped>
.home-list {
  margin: 40px 20px 0 20px;
  height: 200px;
  // border: solid 1px #aab6b6;
  border-radius: 20px;
  box-shadow: 0 0 10px #aab6b6;
  box-sizing: border-box;
  text-align: left;
  padding: 20px 40px;
  h2 {
    overflow: hidden;
    text-overflow:ellipsis;
    white-space: nowrap;
    a {
      text-decoration: none;
      color: #409eff;
    }
  }
  .author {
    margin-right: 20px;
  }
  .date {
    font-size: 12px;
    color: #777;
  }
  .tag {
    font-size: 14px;
  }
  &:hover {
    box-shadow: 5px 5px 15px #d9e7e9;
    // cursor: pointer;
  }
}
</style>